<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css3盒子模型加after伪元素练习</title>
    <style>
    div {
        height: 230px;
        width: 613px;
        margin: 50px auto;
        position: relative;
        border-radius: 10px;
        overflow: hidden;
    }
    img {
        width: 100%;
    }
    div:hover::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 10px solid rgba(255, 255, 255, .3);
        box-sizing: border-box;
    }
    </style>
</head>
<body>
    <div>
        <img src="mi.jpg" />
    </div>
</body>
</html>